package com.googlecode.allinclusive.fw.core.data.input.excel.config;

import java.util.ArrayList;
import java.util.List;

public class ExcelConfig {
	
	public static final String MAPPING_COLUMN_NAME_MATCH = "COLUMN_NAME_MATCH";
	public static final String MAPPING_COLUMN_INDEX_LOOP = "COLUMN_INDEX_LOOP";
	public static final String MAPPING_COLUMN_INDEX_SET = "COLUMN_INDEX_SET";

	/** Excel映射文件配置信息的标识ID*/
	private String id;
	
	/** Column自增长，Column名匹配*/
	private String mappingType = MAPPING_COLUMN_INDEX_LOOP;

	/** 解析Sheet*/
	private int sheet = 0;
	/** 解析开始行数*/
	private int startRow = 0;
	/** 解析开始列数*/
	private int startCol = 0;
	
	/** 映射关系*/
	private List<ExcelColumn> columns;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public int getStartRow() {
		return startRow;
	}

	public void setStartRow(int startRow) {
		this.startRow = startRow;
	}

	public int getStartCol() {
		return startCol;
	}

	public void setStartCol(int startCol) {
		this.startCol = startCol;
	}

	public List<ExcelColumn> getColumns() {
		return columns;
	}

	public void setColumns(List<ExcelColumn> columns) {
		this.columns = columns;
	}
	
	public int getSheet() {
		return sheet;
	}

	public void setSheet(int sheet) {
		this.sheet = sheet;
	}

	public void addColumn(ExcelColumn column) {
		if (columns == null) {
			columns = new ArrayList<ExcelColumn>();
		}
		columns.add(column);
	}
}
